<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><fmt:message key="flightAdjustProtectList.title"/></title> 
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
<script src="<c:url value="/scripts/datetime.js"/>" language="javascript"></script>
</head>

<body leftmargin="0" topmargin="0">
<html:form action="flightAdjustProtect" method="post" styleId="flightAdjustProtectForm">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="44" class="home-content-title"><img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle">
    <fmt:message key="flightAdjustProtectEdit.heading"/></td>
  </tr>
  <tr>
    <td height="30" class="home-search-space">&nbsp;<fmt:message key="common.warning"/></td>
  </tr>
  <logic:messagesPresent>
		<tr id="messagesPresentTrId" style="display:;">
			<td valign="top" class="black12" height="20">
				<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
					<tr>
						<td class="arror_bg">
							<span class="arror_title">
						     您的操作存在如下错误：<br></span>
						     <html:errors/>
					    </td>
				    </tr>
			    </table>
			</td>
		</tr>
  </logic:messagesPresent>
  <tr id="messageTrId" style="display:none;">
	<td valign="top" class="black12">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<tr>
	<td class="arror_bg_s">
	<span class="arror_title_s"> 
        保存信息成功!<br/>
     </span>
    </td>
    </tr>
    </table>
	</td>
	</tr>
  <tr>
    <td valign="top"> 
      <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"> </td>
        </tr>
        <tr> 
          <td class="home-table-leftline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
               <tr> 
                <td class="home-table-tool-content"> 
                  <input name="Submit33" type="button" class="home-inputBtn" value="保存" onclick="doSave()" 
       			<logic:messagesNotPresent>
		          <c:if test="${'send' eq param.mode || '2' eq param.type}">
				  	disabled
				  </c:if>	
       			</logic:messagesNotPresent>  				  
		          >
		          
			       
			       <html:reset styleClass="home-inputBtn">
            			<fmt:message key="button.reset"/>
			       </html:reset>
        		   <%--html:cancel styleClass="home-inputBtn" property="method.cancel">
            			<fmt:message key="button.cancel"/>
			       </html:cancel--%>
		          <input name="Submit33" type="button" class="home-inputBtn" value="保存并提交" onclick="send()" 
       			<logic:messagesNotPresent>
		          <c:if test="${'send' eq param.mode || '2' eq param.type}">
				  	disabled
				  </c:if>	
       			</logic:messagesNotPresent>  				  
		          >
                  <%--input name="Submit44" type="button" class="home-inputBtn" value="信息交流" onclick="window.open('sendmsg.html',null,'top=200,height=300,width=500,status=no,toolbar=no,menubar=no,location=no')"/--%>
		       </td>
              </tr>
              <tr>
                <td align="center" valign="top">&nbsp;</td>
              </tr>
              <tr> 
                <td valign="top" class="home-edittable-space"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    
                    <tr> 
                      <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">
                          <tr> 
                            <td width="20%" class="home-subtable-view-tdstyle-right">发布时间：</td>
                            <td class="home-subtable-view-tdstyle-left">2007-05-25 08:30</td>
                            <td width="20%" class="home-subtable-view-tdstyle-right">航班号：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.flightNum}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">始发站：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.dan}"/></td>
                            <td class="home-subtable-view-tdstyle-right">终点站：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.aan}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">计划起飞日期/时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInfo.std}" pattern="yyyy-MM-dd HH:mm"/></td>
                            <td class="home-subtable-view-tdstyle-right">调整后起飞日期/时间：</td>
                            <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInfo.currentTime}" pattern="yyyy-MM-dd HH:mm"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">调整类别：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:if test="${flightAdjustInfo.adjustType==1}">临时性调整</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==2}">临时性取消</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==3}">计划性调整</c:if>
                            <c:if test="${flightAdjustInfo.adjustType==4}">计划性取消</c:if></td>
                            <td class="home-subtable-view-tdstyle-right">调整原因：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.reasonInName}"/></td>
                          </tr>
                           <tr> 
                            <td class="home-subtable-view-tdstyle-right">公务舱人数：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.passagerNum}"/></td>
                            <td class="home-subtable-view-tdstyle-right">经济舱人数：</td>
                            <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.econNum}"/></td>
                          </tr>
                          <tr> 
                            <td class="home-subtable-view-tdstyle-right">总人数：</td>
                            <td colspan=3 class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInfo.passagerTotal}"/></td>
			              </tr>
                        </table>
                      </td>
                    </tr>
			         <tr> 
			          <td>&nbsp;</td>
			         </tr>     
         
                    <tr> 
                      <td class="home-table-tool-content">餐食安排指示</td>
                    </tr>
                    
                    <tr> 
						<td valign="top" class="home-tab-line"> 
							<table width="100%" border="0" cellspacing="1" cellpadding="2" class="home-subtable-bgcolor">
								<tr height=25> 
									<td width="40%" class="home-table-tool-conten">餐食名称</td>
									<td width="20%" class="home-table-tool-conten">份数</td>
									<td width="20%" class="home-table-tool-conten">单价</td>
									<td width="20%" class="home-table-tool-conten">合计</td>
								</tr>
								<c:forEach var="results" items="${foodList}" varStatus="status">
								<tr height=25> 
									<td class="home-tab-content">&nbsp;<c:out value="${results.foodName}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.amount}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.price}"/></td>
									<td class="home-tab-content">&nbsp;<c:out value="${results.total}"/></td>
								</tr>
								</c:forEach>
								<tr height=25> 
									<td class="home-tab-content"><b>总计：</b></td>
									<td class="home-tab-content"><b><c:out value="${totalAmount}"/></b></td>
									<td class="home-tab-content">&nbsp;</td>
									<td class="home-tab-content"><b><c:out value="${totalMoney}"/>元</b></td>
								</tr>
							</table>
						</td>
					</tr>
                               
         <tr> 
           <td><table width="100%" border="0" cellpadding="4" cellspacing="1" class="home-subtable-bgcolor">

			<html:hidden property="id"/>
			<html:hidden property="flightInfoId"/>
			<input type="hidden" name="flightAdjustInfoId" value="<c:out value='${flightAdjustInfoId}'/>"/>
           <!--
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.flightInfoId"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="flightInfoId" styleId="flightInfoId" styleClass="home-table-inputbox" /> 
			<html:errors property="flightInfoId"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.standard"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="standard" styleId="standard" styleClass="home-table-inputbox" /> 
			<html:errors property="standard"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.cashCount"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="cashCount" styleId="cashCount" styleClass="home-table-inputbox" /> 
			<html:errors property="cashCount"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.cashMoney"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="cashMoney" styleId="cashMoney" styleClass="home-table-inputbox" /> 
			<html:errors property="cashMoney"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.bookCount"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="bookCount" styleId="bookCount" styleClass="home-table-inputbox" /> 
			<html:errors property="bookCount"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.compensationMemo"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="compensationMemo" styleId="compensationMemo" styleClass="home-table-inputbox" /> 
			<html:errors property="compensationMemo"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.bookMoney"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="bookMoney" styleId="bookMoney" styleClass="home-table-inputbox" /> 
			<html:errors property="bookMoney"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.totalMoney"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="totalMoney" styleId="totalMoney" styleClass="home-table-inputbox" /> 
			<html:errors property="totalMoney"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.superfluityApproveMan"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="superfluityApproveMan" styleId="superfluityApproveMan" styleClass="home-table-inputbox" /> 
			<html:errors property="superfluityApproveMan"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.superfluityApproveDate"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="superfluityApproveDate" styleId="superfluityApproveDate" styleClass="home-table-inputbox" /> 
			<html:errors property="superfluityApproveDate"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.superfluityMemo"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="superfluityMemo" styleId="superfluityMemo" styleClass="home-table-inputbox" /> 
			<html:errors property="superfluityMemo"/>
			</td>
			</tr>
            -->
            <tr> 
              <td class="home-subtable-view-tdstyle-right">交接地点：</td>
              <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInstruction.foodAddress}"/></td>
              <td class="home-subtable-view-tdstyle-right">期望完成配餐时间：</td>
              <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInstruction.foodTime}" pattern="yyyy-MM-dd HH:mm"/></td>
            </tr>
            <tr> 
              <td class="home-subtable-view-tdstyle-right">指示发布人：</td>
              <td class="home-subtable-view-tdstyle-left"><c:out value="${flightAdjustInstruction.operatorName}"/></td>
              <td class="home-subtable-view-tdstyle-right">指示发布时间：</td>
              <td class="home-subtable-view-tdstyle-left"><fmt:formatDate value="${flightAdjustInstruction.operatime}" pattern="yyyy-MM-dd HH:mm"/></td>
            </tr>
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label key="flightAdjustProtectForm.foodAcceptMemo" needed="true"/>：
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left"  colspan="3">
			<html:textarea property="foodAcceptMemo" styleId="foodAcceptMemo" styleClass="home-table-inputbox" cols="81" rows="2"/> 
			
			</td>
			</tr>
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label key="flightAdjustProtectForm.foodAcceptor" needed="true"/>：
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left" width="20%">
			<html:text property="foodAcceptor" styleId="foodAcceptor" styleClass="home-table-inputbox" /> 
			
			</td>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label key="flightAdjustProtectForm.foodAcceptDate" needed="true"/>：
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="foodAcceptDate" styleId="foodAcceptDate" styleClass="home-table-inputbox" />
			<img src="images/date.gif" border="0" onclick="fPopCalendar(foodAcceptDate,foodAcceptDate);return false"> 
			
			</td>
			</tr>
            <!-- 
			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.foodMemo"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="foodMemo" styleId="foodMemo" styleClass="home-table-inputbox" /> 
			<html:errors property="foodMemo"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.hotelMemo"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="hotelMemo" styleId="hotelMemo" styleClass="home-table-inputbox" /> 
			<html:errors property="hotelMemo"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.otherMemo"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="otherMemo" styleId="otherMemo" styleClass="home-table-inputbox" /> 
			<html:errors property="otherMemo"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.operator"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="operator" styleId="operator" styleClass="home-table-inputbox" /> 
			<html:errors property="operator"/>
			</td>
			</tr>

			<tr>
			<td class="home-subtable-view-tdstyle-right"> 
			<sasis:label   key="flightAdjustProtectForm.operatDate"/>
			 &nbsp;
			</td>
			<td  class="home-subtable-view-tdstyle-left">
			<html:text property="operatDate" styleId="operatDate" styleClass="home-table-inputbox" /> 
			<html:errors property="operatDate"/>
			</td>
			</tr> -->
              </table>
             </td>
           </tr>
                  </table> 
                </td>
              </tr>
              
            </table>
		  </td>
        </tr>
        <tr> 
          <td height="12">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table>
	  </td>
  </tr>
  <tr>
    <td height="10">&nbsp;</td>
  </tr>
</table>
</html:form>
</body>
</html>
<script>
//add by kellen
function send(){
	document.forms[0].action="flightAdjustProtect.html?method=save&mode=send&appId=<c:out value="${param.appId}"/>&workItemId=<c:out value="${param.workItemId}"/>&processinstid=<c:out value="${param.processinstid}"/>";
	document.forms[0].submit();
}
//save adjust protect
function doSave(){
	document.forms[0].action="flightAdjustProtect.html?method=save&appId=<c:out value="${param.appId}"/>&workItemId=<c:out value="${param.workItemId}"/>&processinstid=<c:out value="${param.processinstid}"/>";
	document.forms[0].submit();
}
//保存信息处理 
if("1"=='<c:out value="${msg}"/>'){
	//alert("保存信息成功!");
	var messageTrIdTd=document.getElementById("messageTrId");
	messageTrIdTd.style.display="";
	//window.location=window.location;  
}else if("-1"=='<c:out value="${msg}"/>'){
	alert("保存信息失败!");
	 
}else if("2" == '<c:out value="${msg}"/>'){
	window.location=window.location;  
}
</script>

